using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.ICM
{
	[DataContract, Table("IcmPurchaseOrderCollateral")]
    public class PurchaseOrderCollateral
    {

		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "PoColId", ResourceType = typeof(Resources.PurchaseOrderCollateralResource))]
        public int PoColId { get; set; }

        [ForeignKey("SysCollateralType")]
		[DataMember, Display(Name = "ColTypeId", ResourceType = typeof(Resources.PurchaseOrderCollateralResource))]
        public Nullable<int> ColTypeId { get; set; }

        [ForeignKey("SysCollateralCategory")]
		[DataMember, Display(Name = "ColCatId", ResourceType = typeof(Resources.PurchaseOrderCollateralResource))]
        public Nullable<int> ColCatId { get; set; }

		[DataMember, Display(Name = "PoColRefNo", ResourceType = typeof(Resources.PurchaseOrderCollateralResource))]
        public string PoColRefNo { get; set; }

		[DataMember, Display(Name = "PoColAmount", ResourceType = typeof(Resources.PurchaseOrderCollateralResource))]
        public Nullable<double> PoColAmount { get; set; }

		[DataMember, Display(Name = "PoColDescr", ResourceType = typeof(Resources.PurchaseOrderCollateralResource))]
        public string PoColDescr { get; set; }

        [ForeignKey("PurchaseOrder")]
		[DataMember, Display(Name = "PoId", ResourceType = typeof(Resources.PurchaseOrderCollateralResource))]
        public Nullable<int> IcmPoId { get; set; }

		[DataMember, Display(Name = "ReceiptNo", ResourceType = typeof(Resources.PurchaseOrderCollateralResource))]
        public string ReceiptNo { get; set; }

		[DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.PurchaseOrderCollateralResource))]
        public Nullable<int> CreatedBy { get; set; }

		[DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.PurchaseOrderCollateralResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

		[DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.PurchaseOrderCollateralResource))]
        public Nullable<int> UpdatedBy { get; set; }

		[DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.PurchaseOrderCollateralResource))]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

		[DataMember]
        public virtual PurchaseOrder PurchaseOrder { get; set; }

		[DataMember]
        public virtual SysCollateralCategory SysCollateralCategory { get; set; }

		[DataMember]
        public virtual SysCollateralType SysCollateralType { get; set; }
         
    }
}